﻿@model IEnumerable<BlazorShop.Models.Product>
@{
    Layout = "~/Views/Shared/_LayoutForFront.cshtml";
    ViewData["Title"] = "Sky";
}
<h1>Shop</h1>

@foreach (var item in Model)
{
    <div class="itemlist">
        <div class="leftimage">
            <img src="@item.ImageUrl" width="80" height="80"/>
            <a asp-action="Item" asp-route-id="@item.ProductId">@item.ProductName</a>
            <br />价格：&yen;@item.Price
            <br />描述： @item.ProductDescription
        </div>
    </div>
    <form id="addToCart1" asp-action="AddToCart" asp-route-id="@item.ProductId" method="post">
        <input type="submit" value="添加到购物车" />
    </form>
    <p></p>
    <div style="clear:both"></div>
}

